<template>
  <div>
    <p>子组件</p>
    <button @click="handleClick">点击</button>
    <GrandSon v-bind="$attrs" v-on="$listeners"></GrandSon>
  </div>
</template>

<script>
import GrandSon from './GrandSon';
export default {
  name: 'Child',
  props: {},
  data() {
    return {};
  },
  components: {
    GrandSon,
  },
  created() {
    console.log('======', this.$attrs);
    console.log('======', this.$listeners);
  },
  methods: {
    handleClick() {
      this.$listeners.currentName('儿子');
    },
  },
};
</script>

<style scoped lang='less'>
</style>
